<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en-GB" xml:lang="en-GB">
  <head>
    <title>JSAL Test</title>
    <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
    <script type="text/javascript" src="../src/jsal.js"></script>
    <script type="text/javascript">
      var results;
      function addResult (res) {
          var li = document.createElement('li');
          li.innerHTML = res;
          results.appendChild(li);
      }
      window.onload = function () {
          results = document.getElementById('result');
          jsal.lib('test1', 'lib1');
	  jsal.load('test1', function () {
              addResult('3 (1 of 2). test1 loaded callback');
	  });
          jsal.lib(['test2', 'test3'], 'lib2and3');
          jsal.load(['test2', 'test3.mod1'], function () {
              addResult('3 (1 of 2). test2, test3.mod1 loaded callback');
          });
          window.setTimeout(function () {
              jsal.lib('jsal', '../src');
              jsal.load('jsal.debug', function () {
                 document.getElementById('status').innerHTML = jsal.debug.status();
              });
          }, 1000);
      };
      
    </script>
  </head>
  <body>

    <h1>JSAL Test</h1>

    <p>
      There should be 8 items below.
    </p>

    <ul id="result"></ul>

    <p>
      A status report is output here after a second.
    </p>

    <pre id="status">

    </pre>

  </body>
</html>
